import request from '@/config/axios'

export interface DesignAlertTicketVO {
  id: number
  changeNumber: string
  taskNumber: string
  dictTaskType: number
  productType: string
  productNumber: string
  productName: string
  productStandard: string
  customerCode: string
  dictAlertTicketStatus: number
  otherDescription: string
  approverOpinion: string
  approverTime: Date
  creatorName: string
  taskId: number
  dictAlertReason: number
  alertDrawingQuantity: number
  dictActualitySurvey: number
  customerName: string
  partName: string
}

// 查询技术管理-图纸制作-设计变更单列表
export const getDesignAlertTicketPage = async (params) => {
  return await request.get({ url: `/technology/design-alert-ticket/page`, params })
}

// 查询技术管理-图纸制作-设计变更单详情
export const getDesignAlertTicket = async (id: number) => {
  return await request.get({ url: `/technology/design-alert-ticket/get?id=` + id })
}

// 新增技术管理-图纸制作-设计变更单
export const createDesignAlertTicket = async (data: DesignAlertTicketVO) => {
  return await request.post({ url: `/technology/design-alert-ticket/create`, data })
}

// 修改技术管理-图纸制作-设计变更单
export const updateDesignAlertTicket = async (data: DesignAlertTicketVO) => {
  return await request.put({ url: `/technology/design-alert-ticket/update`, data })
}

// 提交技术管理-图纸制作-设计变更单
export const submitDesignAlertTicket = async (data: DesignAlertTicketVO) => {
  return await request.put({ url: `/technology/design-alert-ticket/commit`, data })
}

// 导出技术管理-图纸制作-设计变更单 Excel
export const exportDesignAlertTicket = async (params) => {
  return await request.download({ url: `/technology/design-alert-ticket/export-excel`, params })
}
